package cz.cvut.kadledav.paa.knapsack.tasks;

import cz.cvut.kadledav.paa.knapsack.bo.Item;

import java.util.Arrays;
import java.util.Comparator;

/**
 * User: David Kadlecek
 * Date: 9.10.13
 */
public class PriceWeightTask extends AApproxOrderBasedTask {
    @Override
    protected void orderItems() {
        Arrays.sort(items, new Comparator<Item>() {
            @Override
            public int compare(Item o1, Item o2) {
                return Double.compare(o2.getPriceWeight(),o1.getPriceWeight());
            }
        });
    }
}
